import axios from 'axios'

const http={};
let Url='http://192.168.43.75/';
http.userLogin=params=>axios.post(Url+'admin/logadmin',params).then(r=>r);
http.topData=(params)=>axios.get(Url+'HomePage/getHomePageInfo').then(r=>r);
http.homeCharts=(params)=>axios.get(Url+'HomePage/getAllEarnings').then(r=>r);
http.userData=(params)=>axios.get(Url+'HomePage/getAllEarnings',params).then(r=>r);
http.houseData=(params)=>axios.get(Url+'WashHouse/getWashHouseAllInfo').then(r=>r);
http.machineData=params=>axios.post(Url+'WashHouse/getWashMachineInfo',params).then(r=>r);
http.deleteMachine=params=>axios.post(Url+'WashMachine/delWashMachineState',params).then(r=>r);
http.userOrderManage=params=>axios.get(Url+'UserOrder/getAllUserOrder',params).then(r=>r);
http.userRechargeRecord=params=>axios.get(Url+'UserRecharge/getAllUserRecharge',params).then(r=>r);
http.userWashMachine=params=>axios.post(Url+'WashMachine/addWashMachine',params).then(r=>r);
http.userWithdrawManage=params=>axios.get(Url+'UserWithdrawDeposit/getUserWithdrawDeposit',params).then(r=>r);
http.agreeClick=params=>axios.post(Url+'UserWithdrawDeposit/updUserWithdrawDeposit',params).then(r=>r);
http.firstLevelData=params=>axios.get(Url+'Proxy/getAllProxyInfo',params).then(r=>r);
http.userBaselData=params=>axios.get(Url+'admin/selUser',params).then(r=>r);
http.userChange=params=>axios.post(Url+'admin/updUserInfo',params).then(r=>r);
http.userSafetyChange=params=>axios.post(Url+'admin/updUserSafetyinfo',params).then(r=>r);
http.userWashHouse=params=>axios.post(Url+'WashHouse/addWashHouse',params).then(r=>r);
http.getMonthData=params=>axios.post(Url+'HomePage/getAllEarningsMonth',params).then(r=>r);
http.getAllAdvertise=params=>axios.get(Url+'Advertising/getALL',params).then(r=>r);
http.updateAdvertise=params=>axios.post(Url+'Advertising/updAdvertising',params).then(r=>r);
http.delAdvertise=params=>axios.get(Url+'Advertising/delAdvertising',params).then(r=>r);
http.addAdvertise=params=>axios.post(Url+'Advertising/addAdvertising',params).then(r=>r);
http.delHouse=params=>axios.post(Url+'WashHouse/updWashhouseInfo',params).then(r=>r);
http.upPropogation=params=>axios.post(Url+'Proxy/updProxySplitRatio',params).then(r=>r);
export default http;